package model

type AppId string

const PUBG AppId = "pubg"
const RUMMY AppId = "rummy"

type PayChannel string

const PAYTM PayChannel = "paytm"
const RAZORPAY PayChannel = "razorpay"
const CASHFREE PayChannel = "cashfree"

type PayStatus int

const PAYING PayStatus = 0
const PAYSUCCESS PayStatus = 1
const PAYFAILD PayStatus = 2

/**
入金表
*/
type PayEntry struct {
	Id             int64      `json:"id"`
	AppId          AppId      `xorm:"app_id" json:"app_id"`
	PayChannel     PayChannel `xorm:"pay_channel" json:"pay_channel"`
	AppOrderId     string     `xorm:"app_order_id" json:"app_order_id"`
	OrderId        string     `xorm:"order_id" json:"order_id"`
	PaymentOrderId string     `xorm:"payment_order_id" json:"payment_order_id"`
	PaymentId      string     `xorm:"payment_id" json:"payment_id"`
	Status         PayStatus  `xorm:"status" json:"status"`
	Amount         int64      `xorm:"amount" json:"amount"`
	UserId         string     `xorm:"user_id" json:"user_id"`
	UserName       string     `xorm:"user_name" json:"user_name"`
	Phone          string     `xorm:"phone" json:"phone"`
	Email          string     `xorm:"email" json:"email"`
	Address        int64      `xorm:"address" json:"address"`
	ThirdCode      string     `xorm:"third_code" json:"third_code"`
	ThirdDesc      string     `xorm:"third_desc" json:"third_desc"`
	Created        int64      `xorm:"created" json:"created"`
	Updated        int64      `xorm:"updated" json:"updated"`
}

type EntryCallbackList struct {
}

/**
回调数据结构体
*/
type CallbackData struct {
	PaymentOrderId string    `json:"payment_order_id"`
	Status         PayStatus `json:"status"`
}
